Add Delta Lake 4.0 support and consolidate common code across delta-33x and delta-40x - #13570
Closed
nartal1 wants to merge 15 commits into
Closed
Add Delta Lake 4.0 support and consolidate common code across delta-33x and delta-40x#13570nartal1 wants to merge 15 commits into
nartal1 wants to merge 15 commits into
Conversation
refactor common code between 330 and 400 Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Collaborator
Author
|
build |
Collaborator
Author
|
build |
Collaborator
Author
|
build |
Collaborator
Author
|
I ran the NDS benchmark and the results are posted in the description. No regression between 330 and 400. |
…lta_lake_400_support
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Collaborator
Author
|
build |
nartal1
marked this pull request as ready for review
October 9, 2025 20:57
Collaborator
|
Change the description of the PR because it's not in draft anymore. |
nartal1
marked this pull request as draft
October 15, 2025 03:01
Collaborator
Author
|
Moving this PR back to draft. Evaluating if this can be broken into smaller PR's to make the reviews easier. |
3 tasks
Collaborator
Author
|
Will be breaking up this large PR into smaller ones for making it easier to review. Closing this. |
nartal1
added a commit
that referenced
this pull request
Oct 17, 2025
Contributes to #13339 ### Description This is the first PR to add delta-4.0 support. This is to make the review easier than going over the big PR - #13570. There will be subsequent PR's to add delta-lake-4.0 support and consolidation of common code between delta-330 and delta-400. In this PR, - Added delta-40x module with basic directory structure - Added pom.xml for delta-40x module - Added stub DeltaProbeImpl that returns NoDeltaProvider - Updated root pom.xml and scala2.13/pom.xml to include delta-40x for buildver=400 - Added delta40x.version property (4.0.0) This PR creates the skeleton for Delta Lake 4.0.x support. The module compiles but does not provide actual Delta functionality yet (returns NoDeltaProvider). ## Testing Built successuly without compile errors: Delta 3.3.0 (Scala 2.12, Spark 3.5.6) Delta 4.0.0 (Scala 2.13, Spark 4.0.0) ### Checklists - [ ] This PR has added documentation for new or modified features or behaviors. - [ ] This PR has added new tests or modified existing tests to cover new code paths. (Please explain in the PR description how the new code paths are tested, such as names of the new/existing tests that cover them.) - [ ] Performance testing has been performed and its results are added in the PR description. Or, an issue has been filed with a link in the PR description. --------- Signed-off-by: Niranjan Artal <nartal@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13339.
Description
This PR adds GPU acceleration support for Delta Lake 4.0.x and consolidates common code between Delta 3.3.x and 4.0.x implementations. By extracting shared logic into base classes and using a shims pattern for version-specific APIs, we reduce code duplication while maintaining compatibility across both Delta versions.
Key Changes
1. Delta Lake 4.0.x Support
delta-40xmodule with full Delta Lake 4.0 compatibilitySqlSparkSession,ClassicSparkSession)RuntimeReplaceableexpressions in statistics collection2. Code Consolidation Strategy
Shared Base Classes (
delta-lake/common/src/main/delta-33x-40x/scala/)Command Base Classes:
GpuDeleteCommandBase- Consolidates DELETE command logicGpuUpdateCommandBase- Consolidates UPDATE command logicGpuCreateDeltaTableCommandBase- Unifies table creation flow for table operationsGpuOptimizeTableCommand- Common OPTIMIZE command implementationCatalog & Data Source:
GpuDeltaCatalogBase- Shared catalog plugin implementation for creating/managing Delta tablesDeltaProviderBase- Common Delta data source provider logicGpuDeltaParquetFileFormatCommon- Unified Parquet format handling with deletion vectors, column mapping, and predicate pushdownGPU Overrides Metadata:
DeleteCommandMetaBase,UpdateCommandMetaBase- Shared metadata for command GPU fallback rulesMergeIntoCommandMetaBase,OptimizeTableCommandMetaBase- Consolidates override metadata logicRapidsRowIndexFiltersBase- Common utilities for deletion vector row index filteringVersion Abstraction Layer:
DeltaCommandShims- Trait abstracting Spark API differences (session types, DataFrame/Column creation, caching)DeltaRuntimeShimBase- Runtime utilities for Delta-specific operationsGpuDeltaFileFormatWriterCommon- Shared file writing infrastructureMetadataShims- Metadata conversion and compatibility utilitiesVersion-Specific Implementations
Delta 3.3.x (
Delta33xCommandShims):SparkSessionthroughoutDataset.ofRows()for DataFrame creationnew Column(expr)for expression wrappingDelta 4.0.x (
Delta40xCommandShims):SqlSparkSessionfor run() methods,ClassicSparkSessionfor operationsTrampolineConnectShims.createDataFrame()for Classic/Connect compatibilityDFUDFShims.exprToColumn()for Column creationRuntimeReplaceableexpression unwrapping for stats collection3. What Remains Version-Specific
The following components have too many version-specific differences to consolidate. We can try to consolidate these files in follow-on PR's:
GpuOptimisticTransaction- Complex transaction logic with version-specific stats/write pathsGpuMergeIntoCommand- Scattered Spark API differences throughout the fileGpuDeltaFileFormatWriter- Version-specific write implementations4. Testing
Verified that delta all delta integration tests pass on : Delta-3.3.0 (Spark-3.5.6) and Delta-4.0.0(Spark-4.0.0)
Benchmark Run results:
No major regression between Delta-330 and Delta-400.
Checklists
(Please explain in the PR description how the new code paths are tested, such as names of the new/existing tests that cover them.)